//
//  NSString+CMCCIOTIGNonNull.m
//  ig
//
//  Created by CMCCIOT on 16/3/4.
//  Copyright © 2016年 CMCCIOT. All rights reserved.
//

#import "NSString+CMCCIOTIGNonNull.h"

@implementation NSString (CMCCIOTIGNonNull)

- (id)NonNull {
    return nil;
}

- (BOOL)isEmpty {
    if (self == nil || [self isEqual:[NSNull null]] || [self isEqualToString:@""]) {
        return YES;
    }
    return NO;
}

- (NSString *)nullClass {
    if (self == nil || [self isEqual:[NSNull null]]) {
        return @"";
    }
    return self;
}

//- (NSString *)nullClassForNumber {
//    if (self == nil || [self isEqual:[NSNull null]]) {
//        return @"0";
//    }
//    return self;
//}

@end
